<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
    <title>生成授权文件</title>
    <%@include file="/WEB-INF/views/include/head.jsp" %>
    <script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <style type="text/css">
        html, body, table {
            background-color: #f5f5f5;
            width: 100%;
            height: 100%;
            text-align: center;
        }

        .form-signin {
            position: relative;
            text-align: left;
            top:200px;
            width: 500px;
            padding: 25px 29px 29px;
            margin: 0 auto 20px;
            background-color: rgba(0, 0, 50, 0.3);
            -webkit-border-radius: 5px;
            -moz-border-radius: 5px;
            border-radius: 5px;
            -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
            -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
            box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
        }

        .control-group {
            border-bottom: none;
        }

        body {
            background: url(${ctxStatic}/images/login_bg.png) no-repeat center center;
            background-size: 100%;
        }

        .control-label {
            color: white;
            line-height: 30px;
            font-size: 15px;
        }

    </style>
</head>
<body>
<div class="form-signin">
    <form:form id="submitLicenseForm" action="${ctx}/license/export" method="post" cssStyle="margin-top: 30px;width: 480px;height: 150px;">
        <div class="control-group">
            <label class="control-label" style="float: left;width: 120px;">授权码：</label>
            <div class="controls" style="float: left;">
                <input name="licenseId" type="text" class="control-label" autocomplete="off" style="height: 25px;width: 320px;"/>
            </div>
        </div>


        <div class="control-group">
            <label class="control-label" style="float: left;width: 120px;">授权开始时间：</label>
            <div class="controls" style="float: left;">
                <input id="beginDate" name="beginDate"  type="text" readonly="readonly" maxlength="20" class="input-medium Wdate" style="height: 25px;width:320px;"
                       onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});"/>
            </div>
        </div>


        <div class="control-group">
            <label class="control-label" style="float: left;width: 120px;">授权结束时间：</label>
            <div class="controls" style="float: left;">
                <input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate" style="height: 25px;width:320px;"
                       onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});"/>
            </div>
        </div>

        <div style="width: 100px;" class="control-group">
            <a href="javascript:void(0)" class="btn btn-primary" style="margin-left:120px;width: 120px;margin-top: 20px;"
               onclick="submitLicense()">&nbsp;&nbsp;下载授权&nbsp;&nbsp;</a>
        </div>
    </form:form>
</div>

<script type="text/javascript">
    function submitLicense() {
        $("#submitLicenseForm").submit();
    }
</script>
</body>
</html>